<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>key 属性的使用</title>
</head>
<body>
<div id="app">
    <ul>
        <li v-for="(name, index) in nameList" v-bind:key="index">{{ index }}. {{ name }}</li>
    </ul>
</div>

<script src="../../../../../js/vue.global.js"></script>
<script>
    const app = Vue.createApp({
        data() {
            return {
                nameList: ["Jim", "James", "Kevin", "Kobe"]
            }
        },
        methods: {}
    })

    app.mount("#app")
</script>
</body>
</html>